package com.jmb.api.web.controller.interfaces.Assert;

import com.jmb.api.common.result.Result;
import com.jmb.api.entity.InterfaceAssert;
import com.jmb.api.web.service.InterfaceAssertService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "接口断言")
@RestController
@RequestMapping("/web/interfaceAssert")
public class InterfaceAssertController {
    @Autowired
    private InterfaceAssertService interfaceAssertService;

    @PostMapping("/save")
    public Result save(@RequestBody @Validated InterfaceAssert interfaceAssert) {
        interfaceAssertService.saveAssert(interfaceAssert);
        return Result.ok();
    }
}
